<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=2.0">
<link href="${domain}/static/style/admin_style.css" rel="stylesheet" type="text/css">
<title>站点管理 - zhengqiang's blog</title>
</head>
<body>
	<jsp:include page="/WEB-INF/views/admin/include/header.jsp"><jsp:param name="curr" value="article" /></jsp:include>
	<div class="loc">
		<ul>
			<li><a href="${domain}/admin/">管理首页</a><span class="divider">/</span></li>
			<li>文章管理</li>
		</ul>
	</div>
	<div class="main">
		<div class="operation">
			<a href="${domain}/admin/article/add" class="btn btn_g">新建</a>
		</div>
		<div class="list">
			<table border="1">
				<thead>
					<tr>
						<th>ID</th>
						<th>分类</th>
						<th>标题</th>
						<th>日期</th>
						<th>状态</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${articles}" var="article">
					<tr>
						<td class="text_center">${article.id}</td>
						<td class="text_center"><c:out value="${article.category.name}" escapeXml="true" /></td>
						<td class="text_left"><c:out value="${article.title}" escapeXml="true" /></td>
						<td class="text_center"><fmt:formatDate value="${article.postDate}" pattern="yyyy-MM-dd" /></td>
						<td class="text_center">${article.status}</td>
						<td class="text_center"><a href="${domain}/admin/article/edit/${article.id}">编辑</a> 删除</td>
					</tr>
					</c:forEach>
				</tbody>
			</table>
		</div>
		<jsp:include page="/WEB-INF/views/include/pagination.jsp" />
	</div>
</body>
</html>